package com.fat.mapper;

import com.fat.pojo.Article;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int add(Article article);

    List<Article> list(Integer categoryId, String state, String createUser);

    @Select("select * from article where id = #{id}")
    Article findById(Integer id);

    int update(Article article);

    @Delete("delete from article where id = #{id}")
    int delete(Integer id);
}
